import {toObjList} from '../002_property_list_to_obj_list.js'

const tsv = [
  ['name',  'age', 'drink'],
  ['john',   23,   'wine'],
  ['maggie', 45,   'water']
]

test('convert to obj list', () => {
    const expected = [
      {"age": 23, "drink": "wine", "name": "john"},
          {"age": 45, "drink": "water", "name": "maggie"}
    ]

    expect(toObjList(tsv)).toEqual(expected)
})
